<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich">
	<h:form id="form">
		<rich:progressBar mode="ajax" value="#{progressBarBean.currentValue}"
			interval="2000" id="pb" enabled="#{progressBarBean.enabled}"
			minValue="0" maxValue="100" reRenderAfterComplete="progressPanel">
			<f:facet name="initial">
				<h:panelGroup>
					<h:outputText value="Process hasn't started yet" />
					<a4j:commandButton action="#{progressBarBean.startProcess}"
						value="Start Process" execute="@form" render="pb"
						rendered="#{progressBarBean.buttonRendered}"
						style="margin: 9px 0px 5px;" />
				</h:panelGroup>
			</f:facet>
			<f:facet name="finish">
				<h:panelGroup>
					<h:outputText value="Process Done" />
					<a4j:commandButton action="#{progressBarBean.startProcess}"
						value="Restart Process" execute="@form" render="pb"
						rendered="#{progressBarBean.buttonRendered}"
						style="margin: 9px 0px 5px;" />
				</h:panelGroup>
			</f:facet>
			<h:outputText value="#{progressBarBean.currentValue} %" />
		</rich:progressBar>
	</h:form>
</ui:composition>